const {MongoClient} = require("mongodb");
const url = "mongodb://124.70.134.133:12021";
const client = new MongoClient(url);
const dbName = 'information';
async function main(table){
    await client.connect();
    console.log('Connected successfully to server');
    const db = client.db(dbName);
    const collection = db.collection(table);
    return collection;
}
module.exports = main;
